package xuanke;

import java.util.LinkedList;
import java.util.List;

public class Xuanze {
	List bclasss = new LinkedList<>();
	Classlist ss = new Classlist();
	Student s1 = new Student();
	public void kaike(int a1,int a2,int a3) {
		ss.kaike(a1,a2,a3);
	}
	
	public void xuanzeke(String choice) {
		s1.choice = choice;
		for(int i=0;i<ss.kclasss.size();i++) {
			List a = (List)ss.kclasss.get(i);
			if (s1.choice == a.get(0)) {
				System.out.println("选课"+a.get(1)+"成功");
				bclasss.add(a);
				break;
			}
		}
	
		System.out.println("此时课程为");
		ss.show2(bclasss);
	}

	public void shanchuke(String choice2) {
		s1.choice2 = choice2;
		for(int i=0;i<bclasss.size();i++) {
			List a = (List)bclasss.get(i);
			if (s1.choice2 == a.get(0)) {
				System.out.println("退课"+a.get(1)+"成功");
				bclasss.remove(a);
				break;
			}
		}
		System.out.println("此时课程为");
		ss.show2(bclasss);
	}
}